def add(a, b):
    print(a, "+", b, "=")
    return a + b

def minus(a, b):
    print(a, "-", b, "=")
    return a - b

def mul(a, b):
    print(a, "*", b, "=")
    return a * b

def div(a, b):
    print(a, "/", b, "=")
    return a / b

def be_div(a, b):
    print(a, "//", b, "=")
    return a // b

def rem(a, b):
    print(a, "%", b, "=")
    return a % b

def root(a):
    print(a, "^1/2 =")
    return a ** (1/2)

a = int(input("请输入数字："))
symbol = str(input("请输入要执行的操作："))
if str(symbol) == "开方":
    print(root(a))
else:
    b = int(input("请输入数字："))
    if str(symbol) == "+":
        print(add(a, b))
    elif str(symbol) == "-":
        print(minus(a, b))
    elif str(symbol) == "*":
        print(mul(a, b))
    elif str(symbol) == "/":
        print(div(a, b))
    elif str(symbol) == "//":
        print(be_div(a, b))
    elif str(symbol) == "%":
        print(rem(a, b))
    else:
        print("无法进行该运算")